<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>顺运通后台应用管理</title>
<script type="text/javascript" charset="utf-8" src="/plugin/cooperation_base.js?v=v1.00"></script>
<link rel="stylesheet" type="text/css" href="/static/skin/green/css/list.css">
<script charset="utf-8" type="text/javascript" src="/plugin/cooperation_unit/my97/wdatepicker.js?v=v1.00"></script>
<link href="http://syt.cn/plugin/cooperation_unit/my97/skin/WdatePicker.css" rel="stylesheet" type="text/css">
<style type="text/css">
.menu_hover{font-size: 14px; font-weight: bold; color: #000000;}
#table_jl input{width:100px;height:25px;}
.titleinfo{font-weight: normal;color: #ff0000;}
</style>

<?php
	$path_one = 'admin/admin_system';
	$path_two = 'admin/admin_module';
	$filename = 'admin/admin_admin_list';

	require_once $_site->get_handlepath('admin');
	require_once $_site->get_handlepath('city');
	
	$cookie = admin_fun_cookie();
	if(!$cookie){
		location_msg(L('1411'), '/admin/login', 0);
	}
	if($cookie['state'] != 1){
		//账号被禁用
		location_msg(L('1404'), '/admin/login', 0);
	}	
	
	
	require_once("admin_comm.php");
	require_once $_site->get_handlepath('admin');

	$object=new admin();
	$result=$object->out_info_id($cookie['id'],'fbtime');
	$fbtime=$result['fbtime'];
?>
<script type="text/javascript" charset="utf-8">	
function addrows(){
var ids = parseInt(Math.random() * 10000);	
var t=document.getElementById("table_jl") 
var tr=document.createElement("tr");  
tr.id='url'+ids;
tr.innerHTML="<td><input name=\"sh[]\" type=\"text\" value=\"\"></td><td><input name=\"eh[]\" type=\"text\" value=\"\"></td><td>【<a href=\"javascript:;\" class=\"remove\" onclick=\"delrows(this);\">删除</a>】【<a href=\"javascript:;\" class=\"remove\" onclick=\"moveuptr('url"+ids+"');\">上移</a>】</td>";
t.appendChild(tr);  
}
function delrows(obj){
var tr=obj.parentNode.parentNode;
    tr.remove();  
}
function saveconfig(){
    $.post("/handle.php",$("#myform").serialize(),function(res){
        if(res.state){
           // parent.change();
            return;
        }
        alert(res.msg);
    },'json');
}
function movetoptr(k){		
    var dom=$('#'+k).prev();
	if(!dom.html())return;    	
	$("#table_jl tr").first().before($('#'+k));	
}
function moveuptr(k){
	var dom=$('#'+k).prev();	
	if(!dom.html())return;		
	dom.before($('#'+k));	
}
function userpicker(tag){
	art.dialog.open("/admin/goodset/goods?tag="+tag,{title: '添加商品',id:'goodlist',width:980,height: 500,lock: true});	   
}
</script> 
</head>
<body>
	<div class="position_nav">你所在的当前位置：<?php echo $path_str;?></div>
		<div class="main">
		<form action="/handle.php" method="post" id="myform">
			<input type="hidden" name="h" value="admin/fbtime">			
			<table cellpadding="0" cellspacing="1" border="0" class="table">
			<thead>
				<tr>
					<th width="30%" align="left">开始时间<font class="titleinfo">（格式如    7:00）</font></th>
					<th width="30%" align="left">截止时间<font class="titleinfo">（格式如   19:00）</font></th>
					<th width="" align="left">操作</th>
				</tr>
				</thead>
				
				<tbody id="table_jl">
				</tbody>	
					
				<tfoot>			
				<tr>
					<td colspan="3"  align="left">
							<input type="button"  value="新增" onclick="addrows();" class="button1">
							<input type="button"  value="保存" onclick="saveconfig();" class="button1">
					</td>
				</tr>
				</tfoot>
			</table>
		</form>	
		</div>
	</div>
</body>
</html>

